<?php
namespace Modules\Groupon\Http\Controllers\Admin\V1;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller;

use Modules\Groupon\Entities\GrouponRecord;

use Validator;
use ThrowException;
use Auth;

class GrouponRecordStatController extends Controller
{
    public function total(Request $req)
    {
        $stat = [
            'working' => GrouponRecord::status('working')->count(),
            'completed' => GrouponRecord::status('completed')->count(),
            'failed' => GrouponRecord::status('failed')->count(),
        ];

        return [
            'stat' => $stat
        ];
    }
}
